//
//  LXWaiyPayTableView.m
//  duoduo
//
//  Created by wanghao on 16/10/28.
//  Copyright © 2016年 LX. All rights reserved.
//

#import "LXWaiyPayTableView.h"
#import "WaitPayCell.h"
#import "PayOrderVC.h"

@interface LXWaiyPayTableView ()
@property(nonatomic,strong) NSArray *data;
@end

@implementation LXWaiyPayTableView

- (void)viewDidLoad {
    [super viewDidLoad];
    self.tableView.backgroundColor = LXHexColor(0xF5F6F7);
    [self.tableView registerNib:[UINib nibWithNibName:@"WaitPayCell" bundle:nil]forCellReuseIdentifier:@"waitPayCell"];
    self.tableView.tableFooterView = [[UIView alloc]init];
}

- (void)toPayClick:(UIButton *)sender
{
    PayOrderVC * vc = [[PayOrderVC alloc]init];
    [self.navigationController pushViewController:vc animated:YES];
}

#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return 5;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {

    return 1;
}


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    WaitPayCell *cell = [tableView dequeueReusableCellWithIdentifier:@"waitPayCell"];
    [cell.toPayBtn addTarget:self action:@selector(toPayClick:) forControlEvents:UIControlEventTouchUpInside];
    return cell;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    // 取消选中状态
    [tableView deselectRowAtIndexPath:indexPath animated:NO];
//    Poolinfo_ViewController * vc = [[Poolinfo_ViewController alloc]init];
//    [self.navigationController pushViewController:vc animated:YES];
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 290;
}


- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
    return 20;
}

@end
